<script type="text/javascript">
<!--
function page_change()
{
	var i = parseInt($('#txt_go_page').val());
	location.href = '<?php echo $pager->page_url.'?'.$pager->params.$pager->page_var.'=';?>'+i;
}
//-->
</script>
<div class="page-bottom">
    <?php if ($pager->cur_page > 1){?>
    <a class="page_next" href="<?php echo $pager->url($pager->cur_page-1);?>"><span><?php echo $pager->str_pre_page;?></span></a>
    <?php } ?>
	
	<?php if ($pager->total_pages < 11){ /* ? Previous  1 2 3 4 5 6 7 8 9 10 11 12  Next ? */ ?>
        <?php for ($i = 1; $i <= $pager->total_pages; $i++){ ?>
            <?php if ($i == $pager->cur_page){ ?>
            	<span class="page-cur"><?php echo $i; ?></span>
            <?php }else{ ?>
                <a href="<?php echo $pager->url($i) ;?>"><?php echo $i; ?></a>
            <?php } ?>
        <?php } ?>

    <?php }elseif ($pager->cur_page < 9){ /* ? Previous  1 2 3 4 5 6 7 8 9 10 … 25 26  Next ? */ ?>

        <?php for ($i = 1; $i <= 10; $i++){ ?>
            <?php if ($i == $pager->cur_page){ ?>
            	<span class="page-cur"><?php echo $i; ?></span>
            <?php }else{ ?>
                <a href="<?php echo $pager->url($i) ;?>"><?php echo $i; ?></a>
            <?php } ?>
        <?php } ?>
        <span class="page-break">...</span>
        <a href="<?php echo $pager->url($pager->total_pages - 1) ;?>"><?php echo $pager->total_pages - 1; ?></a>
        <a href="<?php echo $pager->url($pager->total_pages); ?>"><?php echo $pager->total_pages; ?></a>

    <?php }elseif ($pager->curr_page > $pager->total_pages - 8){ /* ? Previous  1 2 … 17 18 19 20 21 22 23 24 25 26  Next ? */ ?>

        <a href="<?php echo $pager->url(1) ?>">1</a>
        <a href="<?php echo $pager->url(2) ?>">2</a>
        <span class="page-break">...</span>
        <?php for ($i = $pager->total_pages - 9; $i <= $pager->total_pages; $i++){ ?>
            <?php if ($i == $pager->cur_page){ ?>
            	<span class="page-cur"><?php echo $i; ?></span>
            <?php }else{ ?>
                <a href="<?php echo $pager->url($i) ;?>"><?php echo $i; ?></a>
            <?php } ?>
        <?php } ?>

    <?php }else{ /* ? Previous  1 2 … 5 6 7 8 9 10 11 12 13 14 … 25 26  Next ? */ ?>

        <a href="<?php echo $page->url(1) ?>">1</a>
        <a href="<?php echo $page->url(2) ?>">2</a>
        <span class="page-break">...</span>
        <?php for ($i = $pager->cur_page - 5; $i <= $pager->cur_page + 5; $i++){ ?>
            <?php if ($i == $pager->cur_page){ ?>
            	<span class="page-cur"><?php echo $i; ?></span>
            <?php }else{ ?>
                <a href="<?php echo $pager->url($i) ;?>"><?php echo $i; ?></a>
            <?php } ?>
        <?php } ?>
		<span class="page-break">...</span>
        <a href="<?php echo $pager->url($pager->total_pages - 1) ?>"><?php echo $pager->total_pages - 1 ?></a>
        <a href="<?php echo $pager->url($pager->total_pages) ?>"><?php echo $pager->total_pages ?></a>

    <?php } ?>
    <?php if ($pager->cur_page < $pager->total_pages){?>
        <a href="<?php echo $pager->url($pager->cur_page+1); ?>"><?php echo $pager->str_next_page;?></a>
    <?php }else{ ?>
        <?php echo $pager->str_next_page;?>
    <?php } ?>
 </div>